package com.wise.summer.v1.cms.content.menu;

import com.wise.entities.content.Menu;
import com.wise.framework.annotations.ApiInfo;
import com.wise.framework.annotations.Publish;
import com.wise.framework.annotations.validation.AssertEnum;
import com.wise.framework.annotations.validation.NotNull;
import com.wise.framework.daoannotations.Column;
import com.wise.framework.summer.BasicSummer;
import com.wise.model.content.enums.MenuType;
import lombok.Getter;
import lombok.Setter;

import static com.wise.model.content.ContentErrMsgs.*;

@Getter
@Setter
@Publish
@ApiInfo("新增菜单")
public class AddMenu extends BasicSummer<Menu> {
    @ApiInfo("父菜单id")
    private String parentId;
    @ApiInfo("菜单名")
    private String name;
    @ApiInfo("菜单图标")
    private String icon;
    @ApiInfo("菜单路径")
    private String url;
    @ApiInfo("菜单排序")
    private Integer seqencing;
    @ApiInfo("菜单启用状态。 0：不启用   1：启用")
    @NotNull(msg = Err_000500000018)
    private Integer state;
    @ApiInfo("菜单是否底部显示。 0：不显示   1：显示")
    private Integer showStatus;
    @ApiInfo("菜单类型")
    @NotNull(msg = Err_000500000021)
    @AssertEnum(enumClass = MenuType.class, msg = Err_000500000022)
    private Integer type;
    @ApiInfo("扩展信息,例如" +
            "[\n" +
            "    {\n" +
            "        \"type\": 0\n" +
            "    },\n" +
            "    {\n" +
            "        \"infos\": [\n" +
            "            {\n" +
            "                \"categoryId\": \"分类ID-1\",\n" +
            "                \"categoryName\": \"分类名-1\"\n" +
            "            },\n" +
            "            {\n" +
            "                \"categoryId\": \"分类ID-11\",\n" +
            "                \"categoryName\": \"分类名-11\"\n" +
            "            }\n" +
            "        ],\n" +
            "        \"type\": 1\n" +
            "    },\n" +
            "    {\n" +
            "        \"infos\": [\n" +
            "            {\n" +
            "                \"categoryId\": \"分类ID-2\",\n" +
            "                \"categoryName\": \"分类名-2\"\n" +
            "            },\n" +
            "            {\n" +
            "                \"categoryId\": \"分类ID-22\",\n" +
            "                \"categoryName\": \"分类名-22\"\n" +
            "            }\n" +
            "        ],\n" +
            "        \"type\": 1\n" +
            "    },\n" +
            "    {\n" +
            "        \"infos\": [\n" +
            "            {\n" +
            "                \"categoryId\": \"分类ID-3\",\n" +
            "                \"categoryName\": \"分类名-3\"\n" +
            "            },\n" +
            "            {\n" +
            "                \"categoryId\": \"分类ID-33\",\n" +
            "                \"categoryName\": \"分类名-33\"\n" +
            "            }\n" +
            "        ],\n" +
            "        \"type\": 1\n" +
            "    }\n" +
            "]")
    private String extContent;
    private String alias;

    @ApiInfo("菜单图")
    private String titlePic;

    @ApiInfo("菜单描述")
    private String description;

    @ApiInfo("菜单图片高度")
    private String titlePicHeight;
}
